const mysql = require('mysql')

var connection = mysql.createConnection({
    host    :'localhost',
    user    :'root',
    password:'1234',
    port    :'3306',
    database:'test',
})
connection.connect();

let addsqlparams = "'3','菜鸟教程','https://www.runoob.com','23453','CN'"
let addsql = "INSERT INTO web(num,name,url,id,country) VALUES(" + addsqlparams + ")"

connection.query(addsql,(err,result)=>{
    if(err){
        console.log(err.message)
        return
    }
    console.log('--------------------------INSERT----------------------------')  
    console.log('INSERT ID:',result)
    console.log('-----------------------------------------------------------------\n\n')  
})

connection.end()
